package com.master.lambda;

public class LambdaFunctionTest {

  public static void main(String[] args) {
    // 新建一个订单，506.5的金额，10.0的运费
    Order order = new Order(123, 506.5, 10.0);
// 满足金额>=99的条件，则设置运费为0
    order.discount(order,
            o -> o.getPayment() >= 99,
            o -> o.setFreight(0));

  }
}
